<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>修改某项</title>
    <style type="text/css">
        table td{height: 32px;}
        table td:first-child{width: 50px;}
    </style>
</head>
<body>
<table cellspacing="0" cellpadding="0" border="0" width="100%">
    <tr>
        <td>姓名：</td>
        <td><span class="edititem" data-type="text" data-name="name">贺强</span></td>
    </tr>
    <tr>
        <td>性别：</td>
        <td><span class="edititem" data-type="radio" data-url="update/sex" data-name="sex" data-values='[{"value":1,"txt":"男"},{"value":2,"txt":"女"}]'>男</span></td>
    </tr>
    <tr>
        <td>年龄：</td>
        <td><div class="edititem" data-type="select" data-url="update/age" data-name="age" data-values='[{"value":"20","txt":"20"},{"value":"30","txt":"30"},{"value":"33","txt":"33"},{"value":"35","txt":"35"},{"value":"36","txt":"36"},{"value":"37","txt":"37"}]'>36</div></td>
    </tr>
    <tr>
        <td>爱好：</td>
        <td><div class="edititem" data-type="checkbox" data-url="update/aihao" data-name="aihao" data-old_value='["paobu","lanqiu"]' data-values='[{"value":"paobu","txt":"跑步"},{"value":"pingpang","txt":"乒乓球"},{"value":"lanqiu","txt":"篮球"}]'>跑步,篮球</div></td>
    </tr>
</table>
</body>
<script type="text/javascript" src="jquery-2.1.4.min.js"></script>
<script type="text/javascript" src="royui.min.js"></script>
<script type="text/javascript">
    $(function () {
        let $r = new royui()
        $r.edititem({
            elem: '.edititem',
            url: 'update/item',
            param: {id: '111'}
        })
    })
</script>
</html>
